1

 

2

Meadow View Observatory Shut Down Script

3

 

4

 

Set myActiveHome = Wscript.CreateObject("x10.ActiveHome")

Set myCam = WScript.CreateObject("CCDSoft2XAdaptor.CCDSoft5Camera")

Set mymount = WScript.CreateObject("TheSkyXAdaptor.RASCOMtele")

Set myScope = Wscript.CreateObject("AstroPhysicsV2.Telescope")

Set mySky = Wscript.CreateObject("TheSkyXAdaptor.RASCOMTheSky")

Set Speech = CreateObject("SAPI.SpVoice")
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim sText
Sub Talk
SpeakText sText
End Sub

Sub SpeakText(sText)
On Error Resume Next
Speech.Speak sText, SVSFlagsAsync + SVSFPurgeBeforeSpeak
Do
Sleep 1000
Loop Until Speech.WaitUntilDone(10)
End Sub

sText="Shutting down meadow view observatory systems"
Talk
wscript.Sleep 2000

sText="Park Telescope"
Talk

If myscope.Connected= True Then
myscope.Park() 'Park telescope
End If
wscript.Sleep 1000

sText="Telescope Parked"
Talk

sText="Shut down The Sky X"
Talk
mySky.Quit() 'Shut Down The Sky X
wscript.Sleep 1000

sText="Power off Main camera and filter Wheel"
Talk
myActiveHome.SendAction "sendplc", "D8,off" 'power off Camera + Filter Wheel
wscript.Sleep 2000

sText="Power off Astro Physics Mount"
Talk
myActiveHome.SendAction "sendplc", "D1,off" 'Turn off AP900 mount
wscript.Sleep 2000

sText="Power off rotator"
Talk
myActiveHome.SendAction "sendplc", "A5,off" 'Turn off Pyxis Rotator
wscript.Sleep 2000

sText="Power off E L flat screen"
Talk
myActiveHome.SendAction "sendplc", "D6,off" 'Turn off EL flat Screen
wscript.Sleep 2000

sText="Turn off red lights"
Talk
myActiveHome.SendAction "sendplc", "J2,off" 'Turn off redlights
wscript.Sleep 2000

sText="Turn on security lights"
TalK
myActiveHome.SendAction "sendplc", "E4,on" 'Turn on Security Lights
wscript.Sleep 2000

myActiveHome.SendAction "sendplc", "E4,off" 'Turn off Security Lights
wscript.Sleep 2000

myActiveHome.SendAction "sendplc", "E4,on" 'Turn on Security Lights
wscript.Sleep 2000

myActiveHome.SendAction "sendplc", "E4,off" 'Turn off Security Lights
wscript.Sleep 2000

myActiveHome.SendAction "sendplc", "E4,on" 'Turn on Security Lights
wscript.Sleep 2000

sText="Lower light shield"
Talk
myActiveHome.SendAction "sendplc", "K3,off" 'Turn off Light Killer Curtain
wscript.Sleep 2000

myActiveHome.SendAction "sendplc", "J1,on" 'Turn on White light

sText="Meadow view observatory systems are now shutdown"
Talk